home *** CD-ROM | disk | FTP | other *** search
/ One Click 11 / OneClick11.iso / Bancos de Dados / Conversao / Mysql2Excel / Setup.exe / Mysql2Excel.exe / _mysql_exceptions.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2003-06-23  |  4.4 KB  |  87 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.2)
  3.  
  4. '''_mysql_exceptions: Exception classes for _mysql and MySQLdb.
  5.  
  6. These classes are dictated by the DB API v2.0:
  7.  
  8.     http://www.python.org/topics/database/DatabaseAPI-2.0.html
  9. '''
  10. from exceptions import Exception, StandardError
  11.  
  12. class MySQLError(StandardError):
  13.     '''Exception related to operation with MySQL.'''
  14.     pass
  15.  
  16.  
  17. class Warning(MySQLError):
  18.     '''Exception raised for important warnings like data truncations
  19.     while inserting, etc.'''
  20.     pass
  21.  
  22.  
  23. class Error(MySQLError):
  24.     '''Exception that is the base class of all other error exceptions
  25.     (not Warning).'''
  26.     pass
  27.  
  28.  
  29. class InterfaceError(Error):
  30.     '''Exception raised for errors that are related to the database
  31.     interface rather than the database itself.'''
  32.     pass
  33.  
  34.  
  35. class DatabaseError(Error):
  36.     '''Exception raised for errors that are related to the
  37.     database.'''
  38.     pass
  39.  
  40.  
  41. class DataError(DatabaseError):
  42.     '''Exception raised for errors that are due to problems with the
  43.     processed data like division by zero, numeric value out of range,
  44.     etc.'''
  45.     pass
  46.  
  47.  
  48. class OperationalError(DatabaseError):
  49.     """Exception raised for errors that are related to the database's
  50.     operation and not necessarily under the control of the programmer,
  51.     e.g. an unexpected disconnect occurs, the data source name is not
  52.     found, a transaction could not be processed, a memory allocation
  53.     error occurred during processing, etc."""
  54.     pass
  55.  
  56.  
  57. class IntegrityError(DatabaseError):
  58.     '''Exception raised when the relational integrity of the database
  59.     is affected, e.g. a foreign key check fails, duplicate key,
  60.     etc.'''
  61.     pass
  62.  
  63.  
  64. class InternalError(DatabaseError):
  65.     '''Exception raised when the database encounters an internal
  66.     error, e.g. the cursor is not valid anymore, the transaction is
  67.     out of sync, etc.'''
  68.     pass
  69.  
  70.  
  71. class ProgrammingError(DatabaseError):
  72.     '''Exception raised for programming errors, e.g. table not found
  73.     or already exists, syntax error in the SQL statement, wrong number
  74.     of parameters specified, etc.'''
  75.     pass
  76.  
  77.  
  78. class NotSupportedError(DatabaseError):
  79.     '''Exception raised in case a method or database API was used
  80.     which is not supported by the database, e.g. requesting a
  81.     .rollback() on a connection that does not support transaction or
  82.     has transactions turned off.'''
  83.     pass
  84.  
  85. del Exception
  86. del StandardError
  87.